package cn.qidd.keep.domain.config;

import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.MessageSourceSupport;
import org.springframework.context.support.ResourceBundleMessageSource;

/**
 * Created by sunyanping on 2018/9/18
 */
@Configuration
public class MessageSourceConfig extends MessageSourceSupport {

    @Bean(name = "titleMessageSource")
    public MessageSource titleMessageSource() {
        ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
        messageSource.setBasename("static/title");
        messageSource.setDefaultEncoding("UTF-8");
        return messageSource;
    }
}
